

package controller;




import bo.BUS_SanPham;
import com.opensymphony.xwork2.ActionSupport;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.interceptor.ServletRequestAware;




public class XoaSanPhamAction extends ActionSupport implements ServletRequestAware {

    private HttpServletRequest request;

    public XoaSanPhamAction() {

    }



    public String execute() throws Exception {

        int MaSP = Integer.parseInt(request.getParameter("GiaTriTim"));
        BUS_SanPham busSP = new BUS_SanPham();
        boolean flag = busSP.xoasanpham(MaSP);
        if(flag == true)
        {
            return "success";
        }
        return "fail";
        

    }

    @Override
    public void setServletRequest(HttpServletRequest hsr) {
        request = hsr;
        
    }



}